<?php

$api = app('Dingo\Api\Routing\Router');

$api->version('V1',[
    'namespace'  =>'App\Http\Controllers\Api\V1\Frontend\Service'
],function ($api){
    $api->group([
        'prefix'     => 'frontend',
        'middleware' => [
            'jwt.token',
            'service.module'
        ]
    ],function ($api){
        $api->group([
            'prefix' => 'service'
        ],function ($api){
            //it 服务单
            $api->get('hardware','IndexController@getHardware')
                ->name('frontend.service.online.get');

            $api->post('hardware','IndexController@createHardware')
                ->name('frontend.service.online.get');

            $api->get('hardware/server','IndexController@getHardwareServer')
                ->name('frontend.service.online.get');

            $api->get('requirement','IndexController@getRequirement')
                ->name('frontend.service.requirement.get');

            $api->get('requirement/details','IndexController@getRequirementDetails')
                ->name('frontend.service.requirement.details.get');

            $api->get('requirement/edit','IndexController@getRequirementDetails')
                ->name('frontend.service.requirement.details.get');



            //it 服务单节点获取
            $api->get('node','IndexController@getNode')
                ->name('frontend.service.node.get');

            //it 服务单扭转
            $api->post('node','IndexController@handleNode')
                ->name('frontend.service.node.post');

            //网络硬件评估，获取审批人
            $api->get('node/approver','IndexController@hardwareApprover')
                ->name('frontend.service.hardware.approver.get');


            //需求评估审核节点（T10067），自定义节点审批设定
            $api->put('node/custom/approver','IndexController@customApproverUpdate')
                ->name('frontend.service.custom.approver.update');

            //it 服务单展示
            $api->get('index','IndexController@index')
                ->name('frontend.service.index.get');

            //it 服务单的详情信息展示
            $api->get('details','IndexController@details')
                ->name('frontend.service.details.get');

            //it 服务单工作量详情数据
            $api->get('work/assess/details','IndexController@workAssessDetails')
                ->name('frontend.service.work.details.get');

            //it 服务单审批记录数据展示
            $api->get('approval/record','IndexController@approvalRecord')
                ->name('frontend.service.approval.record.get');

            //it 服务单oa记录
            $api->get('oa/record','IndexController@oaRecord')
                ->name('frontend.service.oa.record.get');

            //it 服务单 需求分解数据展示
            $api->get('task/decompose','IndexController@taskDecompose')
                ->name('frontend.service.task.decompose.get');

            //需求分解单模糊查询
            $api->get('task/decompose/search','IndexController@taskDecomposeSearch')
                ->name('frontend.service.task.decompose.search.get');

            //需求分解单详情数据展示
            $api->get('task/decompose/details','IndexController@taskDecomposeDetails')
                ->name('frontend.service.task.decompose.create');

            //需求分解单删除
            $api->delete('task/decompose','IndexController@taskDecomposeDestroy')
                ->name('frontend.service.task.decompose.destroy');

            //需求分解单修改
            $api->put('task/decompose','IndexController@taskDecomposeUpdate')
                ->name('frontend.service.task.decompose.update');

            //需求分解单新增
            $api->post('task/decompose','IndexController@taskDecomposeCreate')
                ->name('frontend.service.task.decompose.create');

            //获取可选的牵头团队列表
            $api->get('task/decompose/leaderteamlist','IndexController@getLeadTeamList')
                ->name('frontend.service.task.decompose.leaderteamlist.get');

            //需求分解单设置牵头单位架构审核
            $api->get('task/decompose/leader/framework','IndexController@taskDecomposeLeaderFramework')
                ->name('frontend.service.task.decompose.framework.get');

            //需求分解单设置牵头单位
            $api->get('task/decompose/leader','IndexController@taskDecomposeLeaderList')
                ->name('frontend.server.task.decompose.leader.get');

            //需求分解单设置牵头
            $api->put('task/decompose/leader','IndexController@taskDecomposeLeader')
                ->name('frontend.service.task.decompose.leader');

            //更新需求分解单牵头团队
            $api->post('task/decompose/leaderteam','IndexController@updateTaskDecomposeLeader')
                ->name('frontend.service.task.decompose.leaderteam.post');

            //需求分解单设置牵头单位 架构审核设置
            $api->put('task/decompose/leader/framework','IndexController@taskDecomposeLeaderUpdateFramework')
                ->name('frontend.service.task.decompose.leader.framework.put');

            //it 服务单工作量评估列表
            $api->get('work/assess','IndexController@workAssess')
                ->name('frontend.service.work.assess');

            //it 服务单工作量评估 人员选择
            $api->get('work/assess/users','IndexController@workAssessUsers')
                ->name('frontend.service.work.assess.user.get');

            //it 服务单工作量评估详情
            $api->get('work/assess/details','IndexController@workAssessDetails')
                ->name('frontend.service.work.assess');

            //it 服务单工作量评估需求人月数据展示
            $api->get('estimate/working','IndexController@estimateWorking')
                ->name('frontend.service.work.assess');

            //it 服务单工作量评估需求人月保存
            $api->post('estimate/working','IndexController@createEstimateWorking')
                ->name('frontend.service.work.assess');

            //it 服务单实施内容条件之实施内容展示
            $api->get('work/assess/condition/implementation','IndexController@workAssessConditionResourcesImplementation')
                ->name('frontend.service.work.assess.condition.implementation.get');

            //it 服务单实施内容条件之资源类型展示
            $api->get('work/assess/condition/resources','IndexController@workAssessConditionResources')
                ->name('frontend.service.work.assess.condition.resources.get');;

            //it 服务单实施内容条件之厂商展示
            $api->get('work/assess/condition/manufacturer','IndexController@workAssessConditionManufacturer')
                ->name('frontend.service.work.assess.condition.manufacturer.get');

            //it 服务单编辑实施内容
            $api->put('work/assess','IndexController@updateWorkAssess')
                ->name('frontend.service.work.assess.put');

            //iit 服务单 创建 工作量评估
            $api->post('work/assess','IndexController@createWorkAssess')
                ->name('frontend.service.work.assess.post');

            //it 服务单 删除 工作量评估
            $api->delete('work/assess','IndexController@destroyWorkAssess')
                ->name('frontend.service.work.assess.delete');

            //it 服务单 初始化需求分析列表
            $api->post('requirement/analysis/init','IndexController@initRequirementAnalysis')
                ->name('frontend.service.requirement.analysis.init.post');

            //it 服务单 需求分析列表
            $api->get('requirement/analysis','IndexController@getRequirementAnalysis')
                ->name('frontend.service.requirement.analysis.get');

            //it 服务单 需求分析填报
            $api->put('requirement/analysis','IndexController@editRequirementAnalysis')
                ->name('frontend.service.requirement.analysis.put');

            //it 服务单 初始化用户验收列表
            $api->post('system/harvest/init','IndexController@initSystemHarvest')
                ->name('frontend.service.system.harvest.init.post');

            //it 服务单 用户验收列表
            $api->get('system/harvest','IndexController@getSystemHarvest')
                ->name('frontend.service.system.harvest.get');

            //it 服务单 用户验收填报
            $api->put('system/harvest','IndexController@editSystemHarvest')
                ->name('frontend.service.system.harvest.post');

            //it 服务单 更新建议用户验收反馈时间
            $api->post('system/harvest/person_date','IndexController@editPersonDate')
                ->name('frontend.service.system.harvest.person_date.post');

            //it 服务单 初始化上线信息列表
            $api->post('system/online/init','IndexController@initSystemOnline')
                ->name('frontend.service.service.online.init.post');

            //it 服务单 上线信息列表
            $api->get('system/online','IndexController@getSystemOnline')
                ->name('frontend.service.online.get');

            //it 服务单 上线信息填报
            $api->put('system/online','IndexController@editSystemOnline')
                ->name('frontend.service.online.put');

            //it 服务单 架构审核 审核意见
            $api->put('architecture/approval','IndexController@architectureApproval')
                ->name('frontend.service.architecture.approval');

            //it 服务单 需求分解 获取项目负责人
            $api->get('task/decompose/project/leader','IndexController@taskDecomposeProjectLeader')
                ->name('frontend.task.service.decompose.project.leader.get');

            //it 服务单 需求分解 设置项目负责人
            $api->put('task/decompose/edit/project/leader','IndexController@editTaskDecomposeProjectLeader')
                ->name('frontend.task.service.decompose.edit.project.leader.put');

            //it 服务单 需求汇总 项目负责人
            $api->get('requirement/project/leader','IndexController@requirementHeadUser')
                ->name('frontend.service.requirement.project.leader.get');

            //it 服务单 需求汇总 涉及系统和系统负责人
            $api->get('requirement/related','IndexController@getRelatedTeamAndSystemLeaderStr')
                ->name('frontend.service.requirement.related.get');

            //it 服务单 需求汇总 开头牵头团队
            $api->get('requirement/leader/team','IndexController@requirementHeadTeam')
                ->name('frontend.service.requirement.leader.team.get');

            //it 服务单 需求汇总 详情展示
            $api->get('requirement/details','IndexController@requirementDetails')
                ->name('frontend.service.requirement.details.get');

            //it 服务单 需求汇总 编辑牵头单位和项目负责人
            $api->put('requirement/details/edit','IndexController@requirementDetailsEdit')
                ->name('frontend.service.requirement.details.edit.put');

            //it 服务单 返回需求分析前置处理
            $api->post('back/req/confirm','IndexController@backReqConfirm')
                ->name('frontend.service.back.req.confirm.post');

            //it 服务单 返回需求实施前置处理
            $api->post('back/user/acceptance','IndexController@backUserAcceptance')
                ->name('frontend.service.back.user.acceptance.post');

            //it 服务单 返回上线信息前置处理
            $api->post('back/online/info','IndexController@backOnlineInfo')
                ->name('frontend.service.back.online.info.post');
        });
    });
});
